<template>
  <div class="not-found">
    <h1>404</h1>
    <p>页面不存在</p>
    <van-button type="primary" @click="goHome">返回首页</van-button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

function goHome() {
  router.push('/')
}
</script>

<style scoped>
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

h1 {
  font-size: 72px;
  margin: 0;
  color: #1989fa;
}

p {
  font-size: 18px;
  margin: 20px 0 30px;
  color: #666;
}
</style> 